﻿@model Courseware
<form class="form-horizontal uiform" method="post"
      data-modal="true"
      data-table=".uitable"
      data-error-el=".alert-danger"
      data-on-submit-success="fx.mtfSuccess"
      action="@Url.Action("Save")">
    <div class="modal-header">
        <button class="close" data-dismiss="modal" type="button" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">@Html.EditStatus("课件")</h4>
    </div>
    <div class="modal-body">
        @Html.AntiForgeryToken()
        @Html.MarkCreate()
        @Html.HiddenFor(p => p.Id)
        <div class="alert alert-danger fxhide"></div>
        <div class="form-group">
            <label class="control-label col-md-3">
                <span class="required"> * </span>
                课件名称：
            </label>
            <div class="col-md-8">
                <input class="form-control" name="@nameof(Model.Name)" value="@Model.Name"
                       data-validate="required: true,maxlength: 30"
                       data-validate-message="required:'请输入课件名称'"
                       type="text" autocomplete="off" />
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-md-3">
                <span class="required"> * </span>
                学时：
            </label>
            <div class="col-md-8">
                <input class="form-control uispin" name="@nameof(Model.PeriodMinute)" value="@Model.PeriodMinute"
                       data-bts-max="10000"
                       data-bts-postfix="分钟"
                       data-validate="required: true,min:1,maxlength: 10"
                       data-validate-message="required:'请输入学时(分钟)'"
                       type="text" autocomplete="off" />
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-3">
                <span class="required"> * </span>
                从业类型：
            </label>
            <div class="col-md-8">
                <select class="form-control uiselect" name="@nameof(Model.WorkType)"
                        data-validate="required: true"
                        data-validate-message="required:'请选择从业类型'">
                    <option></option>
                    @Html.TrainCategoryOption(Model.WorkType)
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-3">
                <span class="required"> * </span>
                课件类型：
            </label>
            <div class="col-md-8">
                <select class="form-control uiselect" name="@nameof(Model.CourseType)"
                        data-validate="required: true"
                        data-validate-message="required:'请选择课件类型'">
                    @*<option></option>*@
                    @Html.CourseTypeOption(Model.CourseType)
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-3">
                <span class="required"> * </span>
                序号：
            </label>
            <div class="col-md-8">
                <input class="form-control" name="@nameof(Model.RowIndex)" value="@Model.RowIndex"
                       type="text" autocomplete="off"
                       data-validate="required: true,digits: true,maxlength: 9"
                       data-validate-message="required:'请输入序号'" />
            </div>
        </div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary" type="submit">
            <i class="fa fa-save"></i> 保存
        </button>
        <button class="btn btn-default" type="button" data-dismiss="modal">
            <i class="fa fa-sign-in"></i> 关闭
        </button>
    </div>
</form>